package com.gjzhao.fmmall.service.timerTask;

/**
 * @Description: 订单超时取消
 * - 使用Spring自带的SpringTask框架：不需要
 * @Author: gjzhao
 * @Date Created in 2022-01-25 4:35 下午
 */
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.scheduling.annotation.Scheduled;
// import org.springframework.stereotype.Component;

//@Component 系统本身已集成quartz框架，为了不与其冲突，将其注释掉
public class OrderTimerCheckTaskBySpringTask {


    private Logger logger = LoggerFactory.getLogger(getClass());

    @Scheduled(cron = "0/5 * * * * ? ") //每5s查询一下订单表状态
    public void closeOrder() {
        logger.info("----------订单超时关闭定时任务开始执行[使用SpringTask实现]---------");
    }
}
